<template>
  <div>
    这里还什么都没写123
    <apple ref="apple" :name="name" @fun = "fun2"></apple>
    <el-button @click="clickButton">输出refs</el-button>
    <banana>
      <div slot= "b2">
        父组件的东西
      </div>
      <div slot>
        父组件的东西第一个
      </div>
    </banana>
  </div>
</template>

<script>
import Apple from './components/apple'
import Banana from './components/banana'
export default {
  data(){
    return {
      name:"apple"
    }
  },
  components:{
    Apple,
    Banana
  },
  methods:{
    fun2(val){
      console.log(val)
    },
    clickButton(){
      console.log(this.$refs.apple)
      this.$refs.apple.logfather();
    }
  }
};
</script>

<style>
</style>